def func():
    a1 = input()
    a, b, c, d = 0, 0, 0, 0
    for i in a1:
        if 'a' <= i <= 'z' or 'A' <= i <= 'Z':
            a = a + 1
        elif '1' <= i <= '9':
            b = b + 1
        elif i == " ":
            c = c + 1
        else:
            d = d + 1
    print(a)
    print(c)
    print(b)
    print(len(a1)-a-b-c)


if __name__ == '__main__':
    func()
